import request from '@/utils/request'

export const getCategory1IdApi = () => {
  return request.get(`/admin/product/getCategory1`)
}
export const getCategory2IdApi = (id) => {
  return request.get(`/admin/product/getCategory2/${id}`)
}
export const getCategory3IdApi = (id) => {
  return request.get(`/admin/product/getCategory3/${id}`)
}

// 根据三级分类 id 获取二级分类 id
export const category2IdApi = (id) => {
  return request.get(`/admin/product/get/category3/${id}`)
}

// 根据 二级分类id 获取一级分类 id
export const category1IdApi = (id) => {
  return request.get(`/admin/product/get/category2/${id}`)
}
